# Create your views here.
from rest_framework.generics import ListAPIView
from .models import Banner
from luffyapi.settings import constant
from .serializers import BannerModelSerializer


class BannerListAPIView(ListAPIView):
    queryset = Banner.objects.filter(is_show=True, is_delete=False).order_by("-orders")[:constant.BANNER_LENGTH]
    serializer_class = BannerModelSerializer
